<!DOCTYPE html>
<html>
<head>
    <title>8D跟踪反馈记录</title>
    #parse("sys/header.html")
    <style>
        .from_tab_wide {
            width: 100% !important;
            padding-top: 1% !important;
        }
    </style>
</head>
<body>
<div id="rrapp" v-cloak>
    <div id="reviewLayer" style="display: none;">
        <form class="form-horizontal" style="width: 350px;">
            <div class="form-group">
                <div class="form-group">
                    <div class="col-sm-2 control-label">设备编码</div>
                    <span class="label label-success" style="vertical-align: bottom;">{{follow8dRecord.devCode}}</span>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">设备名称</div>
                    <span class="label label-success" style="vertical-align: bottom;">{{follow8dRecord.devName}}</span>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">审核完成效果</div>
                    <div class="col-sm-10" style="margin-top: 6px">
                        <Radio-group v-model="reviewStatus">
                            <Radio :label="1"><span>通过</span></Radio>
                            <Radio :label="2"><span>未通过</span></Radio>
                        </Radio-group>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <div id="recheckLayer" style="display: none;">
        <form class="form-horizontal" style="width: 350px;">
            <div class="form-group">
                <div class="form-group">
                    <div class="col-sm-2 control-label">设备编码</div>
                    <span class="label label-success" style="vertical-align: bottom;">{{follow8dRecord.devCode}}</span>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">设备名称</div>
                    <span class="label label-success" style="vertical-align: bottom;">{{follow8dRecord.devName}}</span>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">确认完成效果</div>
                    <div class="col-sm-10" style="margin-top: 6px">
                        <Radio-group v-model="recheckStatus">
                            <Radio :label="1"><span>审核通过</span></Radio>
                            <Radio :label="2"><span>审核不通过</span></Radio>
                        </Radio-group>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <div v-show="showList">
        <Row :gutter="16" style="margin: 8px 0px 0px 1px">
            <div class="search-group">
                <i-col span="4">
                    <i-input v-model="q.devName" @on-enter="query" placeholder="设备名称"></i-input>
                </i-col>
                <i-col span="4">
                    <i-input v-model="q.devSupply" @on-enter="query" placeholder="供应厂家"></i-input>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
        </Row>
        <Row :gutter="16" style="margin: 3px 0px 0px 0px;">
            <div class="buttons-group">
                #if($shiro.hasPermission("follow8drecord:recheck"))
                <i-button type="success" @click="recheck"> &nbsp;确认完成结果</i-button>
                #end
                #if($shiro.hasPermission("follow8drecord:review"))
                <i-button type="primary" @click="review"> &nbsp;审核完成结果</i-button>
                #end
                #if($shiro.hasPermission("follow8drecord:save"))
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                #end
                #if($shiro.hasPermission("follow8drecord:update"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                #end
                #if($shiro.hasPermission("follow8drecord:delete"))
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
                #end
            </div>
        </Row>
        <table id="jqGrid"></table>
    </div>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
        <i-form ref="formValidate" :model="follow8dRecord" :rules="ruleValidate" :label-width="100">
            <Row>
                <i-col span="11">
                    <Form-item label="设备编码" prop="devCode">
                        <i-input v-model="follow8dRecord.devCode" placeholder="设备编码" readonly
                                 icon="md-arrow-dropdown-circle" @on-click="getDeviceInfo"></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11" offset="1">
                    <Form-item label="设备名称" prop="devName">
                        <i-input v-model="follow8dRecord.devName" placeholder="设备名称" readonly></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="工位名称" prop="workName">
                        <i-input v-model="follow8dRecord.workName" placeholder="工位名称"></i-input>
                    </Form-item>
                </i-col>

                <i-col span="11" offset="1">
                    <Form-item label="生产线" prop="proLineName">
                        <i-input v-model="follow8dRecord.proLineName" placeholder="生产线" readonly></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="故障现象" prop="faultAppear">
                        <i-input type="textarea" v-model="follow8dRecord.faultAppear" placeholder="故障现象"></i-input>
                    </Form-item>
                </i-col>
                <i-col span="8" offset="1">
                    <Form-item label="附件" prop="url">
                        <i-hidden v-model="follow8dRecord.file8d" readonly></i-hidden>
                        <i-input v-model="follow8dRecord.file8dName" placeholder="请上传" readonly></i-input>
                    </Form-item>
                </i-col>
                <i-col span="3">
                    <Form-item :label-width="1">
                        <Upload ref="uploadFile" style="width: 300px;" action="../sys/oss/device/8d"
                                :before-upload="handleBeforeUpload"
                                :on-success="handleSuccess" :on-format-error="handleFormatError"
                                :show-upload-list="false"
                                :on-exceeded-size="handleMaxSize">
                            <i-button icon="ios-cloud-upload-outline">上传</i-button>
                        </Upload>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="预防措施" prop="precaution">
                        <i-input type="textarea" v-model="follow8dRecord.precaution" placeholder="预防措施"></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11" offset="1">
                    <Form-item label="问题描述" prop="faultDescr">
                        <i-input type="textarea" v-model="follow8dRecord.faultDescr" placeholder="问题描述"></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="故障发生时间" prop="happenDate">
                        <Date-picker v-model="follow8dRecord.happenDate" placeholder="故障发生时间" type="datetime" format="yyyy-MM-dd hh:mm" placeholder="选择日期" class="from_tab_wide"></Date-picker>
                    </Form-item>
                </i-col>
                <i-col span="11" offset="1">
                    <Form-item label="计划关闭时间" prop="closeDate">
                        <Date-picker v-model="follow8dRecord.closeDate" placeholder="计划关闭时间" type="datetime" format="yyyy-MM-dd hh:mm" placeholder="选择日期" class="from_tab_wide"></Date-picker>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="备注" prop="remark">
                        <i-input type="textarea" v-model="follow8dRecord.remark" placeholder="备注"></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px">返回</i-button>
                <i-button type="info" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
    </Card>
</div>
<script src="${rc.contextPath}/js/device/follow8drecord.js?_${date.systemTime}"></script>

</body>
</html>
